<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of datamat</title>
  <meta name="keywords" content="datamat">
  <meta name="description" content="DATAMAT  Packs a vector of data (length N) into a data matrix of dimension M-by-(N-M+1)">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../menu.html">Home</a> &gt;  <a href="#">ReBEL-0.2.7</a> &gt; <a href="#">core</a> &gt; datamat.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../menu.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="menu.html">Index for .\ReBEL-0.2.7\core&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>datamat
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>DATAMAT  Packs a vector of data (length N) into a data matrix of dimension M-by-(N-M+1)</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function dm=datamat(x,M) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> DATAMAT  Packs a vector of data (length N) into a data matrix of dimension M-by-(N-M+1)

   D = datamat(x,M)

   INPUT
           x       vector of data
           M       data matrix window (frame) size
   OUTPUT
           D       M-by-(N-M+1) datamatrix


   Example    D = datamat([1 2 3 4 5 6 7 8 9],3)

     will generate the following datamatrix,

     D = | 3  4  5  6  7  8  9 |
         | 2  3  4  5  6  7  8 |
         | 1  2  3  4  5  6  7 |


   Copyright (c) Oregon Health &amp; Science University (2006)

   This file is part of the ReBEL Toolkit. The ReBEL Toolkit is available free for
   academic use only (see included license file) and can be obtained from
   http://choosh.csee.ogi.edu/rebel/.  Businesses wishing to obtain a copy of the
   software should contact rebel@csee.ogi.edu for commercial licensing information.

   See LICENSE (which should be part of the main toolkit distribution) for more
   detail.</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="../.././ReBEL-0.2.7/examples/joint_estimation/demje2.html" class="code" title="">demje2</a>	DEMJE2 Demonstrate nonlinear time series joint estimation for Mackey-Glass chaotic time series</li><li><a href="../.././ReBEL-0.2.7/examples/state_estimation/demse3.html" class="code" title="">demse3</a>	DEMSE3  Demonstrate nonlinear time series state estimation for Mackey-Glass chaotic time series</li></ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <span class="comment">% DATAMAT  Packs a vector of data (length N) into a data matrix of dimension M-by-(N-M+1)</span>
0002 <span class="comment">%</span>
0003 <span class="comment">%   D = datamat(x,M)</span>
0004 <span class="comment">%</span>
0005 <span class="comment">%   INPUT</span>
0006 <span class="comment">%           x       vector of data</span>
0007 <span class="comment">%           M       data matrix window (frame) size</span>
0008 <span class="comment">%   OUTPUT</span>
0009 <span class="comment">%           D       M-by-(N-M+1) datamatrix</span>
0010 <span class="comment">%</span>
0011 <span class="comment">%</span>
0012 <span class="comment">%   Example    D = datamat([1 2 3 4 5 6 7 8 9],3)</span>
0013 <span class="comment">%</span>
0014 <span class="comment">%     will generate the following datamatrix,</span>
0015 <span class="comment">%</span>
0016 <span class="comment">%     D = | 3  4  5  6  7  8  9 |</span>
0017 <span class="comment">%         | 2  3  4  5  6  7  8 |</span>
0018 <span class="comment">%         | 1  2  3  4  5  6  7 |</span>
0019 <span class="comment">%</span>
0020 <span class="comment">%</span>
0021 <span class="comment">%   Copyright (c) Oregon Health &amp; Science University (2006)</span>
0022 <span class="comment">%</span>
0023 <span class="comment">%   This file is part of the ReBEL Toolkit. The ReBEL Toolkit is available free for</span>
0024 <span class="comment">%   academic use only (see included license file) and can be obtained from</span>
0025 <span class="comment">%   http://choosh.csee.ogi.edu/rebel/.  Businesses wishing to obtain a copy of the</span>
0026 <span class="comment">%   software should contact rebel@csee.ogi.edu for commercial licensing information.</span>
0027 <span class="comment">%</span>
0028 <span class="comment">%   See LICENSE (which should be part of the main toolkit distribution) for more</span>
0029 <span class="comment">%   detail.</span>
0030 
0031 <span class="comment">%===============================================================================================</span>
0032 
0033 <a name="_sub0" href="#_subfunctions" class="code">function dm=datamat(x,M)</a>
0034 
0035 N=length(x);
0036 
0037 dm=zeros(N,M);
0038 
0039 i=0:N-M;
0040 ii=M:-1:1;
0041 im=repmat(ii',1,N-M+1)+repmat(i,M,1);
0042 
0043 dm=x(im);</pre></div>
<hr><address>Generated on Tue 26-Sep-2006 10:36:21 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>